<template>
  <div class="fenye">
    <el-pagination
      @current-change="handleCurrentChange"
      :current-page="page"
      :page-size="pagesize"
      background
      layout="prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  props: ["page", "pagesize", "total"],
  data() {
    return {
      //  currentPage:1
    };
  },
  methods: {
    handleCurrentChange(val) {
      this.$emit("changePage", val);
      console.log(`当前页: ${val}`);
    },
  },
};
</script>

<style scoped>
.fenye {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
</style>
